package gbench.appdemo.myworld.util;

import java.util.concurrent.CountDownLatch;

public class Latch {

    public Latch(int n) {
        latch = new CountDownLatch(n);
    }

    /**
     * 
     */
    public void countdown() {
        latch.countDown();
    }

    public void await() {
        try {
            latch.await();
        } catch (InterruptedException e) {
            e.printStackTrace();
        }
    }

    final CountDownLatch latch;
}// Latch